{extend name="../../base/view/common/base" /}
{block name="style"}
  <style>

	
.filter-group {height:36px; padding:10px 20px; line-height: 36px; font-size: 14px;}
.filter-group .title { float: left;  min-width: 60px; margin-right:10px; font-weight: 700;}
.filter-group .content {float: left;}
.filter-group .content span{padding: 3px 8px 4px; cursor:pointer;}
.filter-group .content span:hover{color: #186AF2}
.filter-group .filter-select{background-color: #E5EEFD; color: #186AF2; font-weight:600; border-radius: 3px;}
  </style>
{/block}
<!-- 主体 -->
{block name="body"}
<div class="p-3" style="height:100%; box-sizing: border-box;">
	<div class="body-table">
		<h3 class="pb-4">{$admin.department} {$admin.name} 的学习情况 <button class="layui-btn layui-btn-xs ml-4 excel" data-title="{$admin.department}{$admin.name}的学习情况" type="button">导出EXCEL</button></h3>
		<div class="layui-card">
			<div class="layui-card-header"><strong>精品课程</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="100">
					  <col>
					  <col width="100">
					  <col width="150">
					  <col width="150">
					  <col width="150">
					  <col width="100">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">课程ID</th>
						<th>课程名称</th>
						<th style="text-align:center;">课程学分</th>
						<th style="text-align:center;">课程分类</th>
						<th style="text-align:center;">总课时</th>
						<th style="text-align:center;">学习耗时</th>
						<th style="text-align:center;">学习进度</th>
					</tr>
					</thead>
					<tbody>
					{empty name="course"}
					<tr>
						<td colspan="7" style="text-align:center; padding:20px 0; color:#999">暂无学习记录</td>
					</tr>
					{/empty}
					{volist name="course" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.course_id}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">{$vo.credit}</td>
						<td style="text-align:center;">{$vo.cate}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.course_duration)}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration)}</td>
						<td style="text-align:center;">{$vo.progress}%</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
		<div class="layui-card">
			<div class="layui-card-header"><strong>面授培训</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="100">
					  <col>
					  <col width="150">
					  <col width="150">
					  <col width="150">
					  <col width="150">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">课程ID</th>
						<th>培训名称</th>
						<th style="text-align:center;">开课时间</th>
						<th style="text-align:center;">讲师</th>
						<th style="text-align:center;">时长</th>
						<th style="text-align:center;">状态</th>
					</tr>
					</thead>
					<tbody>
					{empty name="train"}
					<tr>
						<td colspan="6" style="text-align:center; padding:20px 0; color:#999">暂无学习记录</td>
					</tr>
					{/empty}
					{volist name="train" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.train_id}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">{$vo.open_time}</td>
						<td style="text-align:center;">{$vo.open_time}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration)}</td>
						<td style="text-align:center;">
							{eq name="$vo.check_status" value="1"}<span>已报名，待审核</span>{/eq}
							{eq name="$vo.check_status" value="2"}<span>报名成功</span>{/eq}
						</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
		<div class="layui-card">
			<div class="layui-card-header"><strong>学习计划</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="100">
					  <col>
					  <col width="150">
					  <col width="150">
					  <col width="150">
					  <col width="150">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">课程ID</th>
						<th>学习计划名称</th>
						<th style="text-align:center;">课程数</th>
						<th style="text-align:center;">总课时</th>
						<th style="text-align:center;">学习耗时</th>
						<th style="text-align:center;">学习进度</th>
					</tr>
					</thead>
					{empty name="learning"}
					<tr>
						<td colspan="6" style="text-align:center; padding:20px 0; color:#999">暂无学习记录</td>
					</tr>
					{/empty}
					<tbody>
					{volist name="learning" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.learning_id}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">共{$vo.step}步骤，{$vo.course_num}门课程</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration)}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration_total)}</td>
						<td style="text-align:center;">{$vo.progress}%</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
		<div class="layui-card">
			<div class="layui-card-header"><strong>岗位学习</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="100">
					  <col>
					  <col width="150">
					  <col width="150">
					  <col width="150">
					  <col width="150">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">课程ID</th>
						<th>学习计划</th>
						<th style="text-align:center;">课程数</th>
						<th style="text-align:center;">总课时</th>
						<th style="text-align:center;">学习耗时</th>
						<th style="text-align:center;">学习进度</th>
					</tr>
					</thead>
					<tbody>
					{empty name="position"}
					<tr>
						<td colspan="6" style="text-align:center; padding:20px 0; color:#999">暂无学习记录</td>
					</tr>
					{/empty}
					{volist name="position" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.position_learning_id}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">共{$vo.course}门课程</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration)}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration_total)}</td>
						<td style="text-align:center;">{$vo.progress}%</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
		<div class="layui-card">
			<div class="layui-card-header"><strong>考试记录</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="100">
					  <col>
					  <col width="150">
					  <col width="150">
					  <col width="150">
					  <col width="150">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">试卷ID</th>
						<th>试卷名称</th>
						<th style="text-align:center;">考试日期</th>
						<th style="text-align:center;">考试时长</th>
						<th style="text-align:center;">考试得分</th>
						<th style="text-align:center;">考试结果</th>
					</tr>
					</thead>
					<tbody>
					{empty name="paper"}
					<tr>
						<td colspan="6" style="text-align:center; padding:20px 0; color:#999">暂无考试记录</td>
					</tr>
					{/empty}					
					{volist name="$paper" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.paper_id}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">{$vo.create_time}</td>
						<td style="text-align:center;">{:getTimeBySec($vo.duration)}</td>
						<td style="text-align:center;">{$vo.score}分 / 总分{$vo.total_score}分</td>
						<td style="text-align:center;">
						{egt name="$vo.score" value="$vo.pass_score"}
							<span class="green">及格</span>
						{else/}
							<span class="red">不及格</span>
						{/egt}
						</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
		<div class="layui-card">
			<div class="layui-card-header"><strong>获得证书</strong></div>
			<div style="padding: 12px;">
				<table class="layui-table" id="integral-table">
					<colgroup>
					  <col width="150">
					  <col>
					  <col width="150">
					  <col width="240">
					  <col width="150">
					</colgroup>
					<thead>
					<tr>
						<th style="text-align:center;">证书编号</th>
						<th>试卷名称</th>
						<th style="text-align:center;">证书类型</th>
						<th style="text-align:center;">签发人</th>
						<th style="text-align:center;">授予日期</th>
					</tr>
					</thead>
					<tbody>
					{empty name="certificate"}
					<tr>
						<td colspan="5" style="text-align:center; padding:20px 0; color:#999">暂无证书记录</td>
					</tr>
					{/empty}
					{volist name="$certificate" id="vo"}
					<tr>
						<td style="text-align:center;">{$vo.code}</td>
						<td>{$vo.title}</td>
						<td style="text-align:center;">{$vo.typestr}</td>
						<td>{$vo.signer}</td>
						<td style="text-align:center;">{$vo.create_time}</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
		
	</div>
</div>
<div style="display:none">
	<table class="layui-table" id="excel-table">
		<tr>
			<td colspan="7"  align="center"><strong>{$admin.department}{$admin.name}的学习情况</strong></td>
		</tr>
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>精品课程</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">课程ID</td>
			<td>课程名称</td>
			<td align="center">课程学分</td>
			<td align="center">课程分类</td>
			<td align="center">总课时</td>
			<td align="center">学习耗时</td>
			<td align="center">学习进度</td>
		</tr>
		{empty name="course"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无学习记录</td>
		</tr>
		{/empty}
		{volist name="course" id="vo"}
		<tr>
			<td align="center">{$vo.course_id}</td>
			<td>{$vo.title}</td>
			<td align="center">{$vo.credit}</td>
			<td align="center">{$vo.cate}</td>
			<td align="center">{:getTimeBySec($vo.course_duration)}</td>
			<td align="center">{:getTimeBySec($vo.duration)}</td>
			<td align="center">{$vo.progress}%</td>
		</tr>
		{/volist}
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>面授培训</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">课程ID</td>
			<td>培训名称</td>
			<td align="center">开课时间</td>
			<td align="center">讲师</td>
			<td align="center">时长</td>
			<td align="center">状态</td>
			<td></td>
		</tr>
		{empty name="train"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无学习记录</td>
		</tr>
		{/empty}
		{volist name="train" id="vo"}
		<tr>
			<td align="center">{$vo.train_id}</td>
			<td>{$vo.title}</td>
			<td align="center">{$vo.open_time}</td>
			<td align="center">{$vo.open_time}</td>
			<td align="center">{:getTimeBySec($vo.duration)}</td>
			<td align="center">
				{eq name="$vo.check_status" value="1"}<span>已报名，待审核</span>{/eq}
				{eq name="$vo.check_status" value="2"}<span>报名成功</span>{/eq}
			</td>
			<td></td>
		</tr>
		{/volist}
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>学习计划</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">课程ID</td>
			<td>学习计划名称</th>
			<td align="center">课程数</td>
			<td align="center">总课时</td>
			<td align="center">学习耗时</td>
			<td align="center">学习进度</td>
			<td></td>
		</tr>
		{empty name="learning"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无学习记录</td>
		</tr>
		{/empty}
		{volist name="learning" id="vo"}
		<tr>
			<td align="center">{$vo.learning_id}</td>
			<td>{$vo.title}</td>
			<td align="center">共{$vo.step}步骤，{$vo.course_num}门课程</td>
			<td align="center">{:getTimeBySec($vo.duration)}</td>
			<td align="center">{:getTimeBySec($vo.duration_total)}</td>
			<td align="center">{$vo.progress}%</td>
			<td></td>
		</tr>
		{/volist}
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>岗位学习</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">课程ID</td>
			<td>学习计划</td>
			<td align="center">课程数</td>
			<td align="center">总课时</td>
			<td align="center">学习耗时</td>
			<td align="center">学习进度</td>
			<td></td>
		</tr>
		{empty name="position"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无学习记录</td>
		</tr>
		{/empty}
		{volist name="position" id="vo"}
		<tr>
			<td align="center">{$vo.position_learning_id}</td>
			<td>{$vo.title}</td>
			<td align="center">共{$vo.course}门课程</td>
			<td align="center">{:getTimeBySec($vo.duration)}</td>
			<td align="center">{:getTimeBySec($vo.duration_total)}</td>
			<td align="center">{$vo.progress}%</td>
			<td></td>
		</tr>
		{/volist}
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>考试记录</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">试卷ID</td>
			<td>试卷名称</td>
			<td align="center">考试日期</td>
			<td align="center">考试时长</td>
			<td align="center">考试得分</td>
			<td align="center">考试结果</td>
			<td></td>
		</tr>
		{empty name="paper"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无考试记录</td>
		</tr>
		{/empty}					
		{volist name="$paper" id="vo"}
		<tr>
			<td align="center">{$vo.paper_id}</td>
			<td>{$vo.title}</td>
			<td align="center">{$vo.create_time}</td>
			<td align="center">{:getTimeBySec($vo.duration)}</td>
			<td align="center">{$vo.score}分 / 总分{$vo.total_score}分</td>
			<td align="center">
			{egt name="$vo.score" value="$vo.pass_score"}
				及格
			{else/}
				不及格
			{/egt}
			</td>
			<td></td>
		</tr>
		{/volist}
		
		<tr>
			<td colspan="7"></td>
		</tr>
		<tr>
			<td colspan="7"><strong>获得证书</strong></td>
		</tr>
		<tr style="background-color:#f5f5f5;">
			<td align="center">证书编号</td>
			<td>试卷名称</td>
			<td align="center">证书类型</td>
			<td align="center">签发人</td>
			<td align="center">授予日期</td>
			<td></td>
			<td></td>
		</tr>
		{empty name="certificate"}
		<tr>
			<td colspan="7" align="center" style="color:#999999;">暂无证书记录</td>
		</tr>
		{/empty}
		{volist name="$certificate" id="vo"}
		<tr>
			<td align="center">{$vo.code}</td>
			<td>{$vo.title}</td>
			<td align="center">{$vo.typestr}</td>
			<td>{$vo.signer}</td>
			<td align="center">{$vo.create_time}</td>
			<td></td>
			<td></td>
		</tr>
		{/volist}
	</table>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
	const moduleInit = ['tool','excel'];
	function gouguInit() {		
		var tool = layui.tool, excel = layui.excel;
		$('body').on('click','.excel',function(){
			let title = $(this).data('title');
			excel.init('excel-table',{name: title});
		})
	}	
</script>
{/block}
<!-- /脚本 -->